﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ItemInput.ascx.cs" Inherits="admin_webparts_Plug_ins_Category_ItemInput" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<%@ Import Namespace="NTTHAO.Web.BL.Category" %>
<script type="text/javascript">if (typeof validatorGroup == "undefined" || !validatorGroup) {
    var validatorGroup = new Array();
}validatorGroup[validatorGroup.length] = {'ctrlToValidate':'<%=txtName.ClientID%>','ctrlToDisplayMessage':'txtNameRequired','validateFunction':NTTHAO.validator.noBlank};
validatorGroup[validatorGroup.length] = {'ctrlToValidate':'<%=txtValue.ClientID%>','ctrlToDisplayMessage':'txtValueRequired','validateFunction':NTTHAO.validator.noBlank};
<%if (_ValueValidatorFunction != string.Empty) { %>
validatorGroup[validatorGroup.length] = {'ctrlToValidate':'<%=txtValue.ClientID%>','ctrlToDisplayMessage':'txtValueValidator','validateFunction':<%=_ValueValidatorFunction %>};
<%} %>
NTTHAO.formValidator.validatorList = validatorGroup;
</script>
<style type="text/css">
    .yuibtn {font-size:1.1em; font-weight: bold; }
    .yuibtn button { font-family: Verdana,Arial,Helvetica,sans-serif; font-weight: bold; }
</style>
<div class="tip">
    <h1 style="left: 0px; position: relative;"><%=LanguageUtility.GetLanguageText("CATEGORY_ITEM_INPUT", Session)%>&nbsp;<%=_Cat.Name.ToLower() %></h1>
    <div style="display: block; width: 32px; height: 32px; float: right; position: relative; top: -27px;"><a title="<%=LanguageUtility.GetLanguageText("CLICK_RETURN", Session) %>" href="?type=<%=Request.QueryString["type"] %>&name=<%=Request.QueryString["name"] %>&action=viewcat&id=<%=Request.QueryString["catid"] %>"><img src="resources/images/Back.png" alt="" /></a></div>
</div>
<style type="text/css">
    .yuibtn {font-size:1.1em; font-weight: bold; }
    .yuibtn button { font-family: Verdana,Arial,Helvetica,sans-serif; font-weight: bold; }
</style>
<form id="aspnetForm" runat="server" method="post" onsubmit="return NTTHAO.formValidator.onFormSubmit();">
<p>
    <span id="spSave" class="yui-button yui-link-button yuibtn yuibtn-icon btnsave"><span class="first-child"><input id="btnSave" type="submit" value="Save" runat="server" onserverclick="btnSave_Click" /></span></span>
    <span id="spCancel" class="yui-button yui-link-button yuibtn yuibtn-icon btncancel"><span class="first-child"><a href="?type=<%=Request.QueryString["type"] %>&name=<%=Request.QueryString["name"] %>&action=viewcat&id=<%=Request.QueryString["catid"] %>" tabindex="0"><%=LanguageUtility.GetLanguageText("CANCEL", Session)%></a></span></span>
</p>
<script type="text/javascript">
    YAHOO.util.Event.onContentReady('spSave', function () {
        var spSave = new YAHOO.widget.Button("spSave");
    });
    YAHOO.util.Event.onContentReady('spCancel', function () {
        var spCancel = new YAHOO.widget.Button("spCancel");
    });
</script>
<table width="100%" cellspacing="1" cellpadding="3" border="1" style="margin-top: 10px;" class="grid">
    <tr class="even">
        <td width="150px" align="right"><%=LanguageUtility.GetLanguageText("NAME", Session) %>:</td>
        <td>
            <asp:TextBox ID="txtName" runat="server" Width="500px"></asp:TextBox>
            <span id="txtNameRequired" style="color: red;display: none;"><br /><%=LanguageUtility.GetLanguageText("CAT_ITEM_NAME_REQUIRED", Session) %></span>
        </td>
    </tr>
    <tr class="odd">
        <td align="right"><%=LanguageUtility.GetLanguageText("VALUE", Session) %>:</td>
        <td>
            <asp:TextBox ID="txtValue" runat="server" Width="500px"></asp:TextBox>
            <div style="color: mediumblue; background-color: moccasin; padding: 3px 10px 3px 10px; display: inline-block; margin: 0px 0px;" id="divValueNote" runat="server"></div>
            <span id="txtValueRequired" style="color: red;display: none;"><br /><%=LanguageUtility.GetLanguageText("CAT_ITEM_VALUE_REQUIRED", Session) %></span>
            <span id="txtValueValidator" style="color: red;display: none;"><br /><%=LanguageUtility.GetLanguageText("CAT_ITEM_VALUE_INVALID", Session) %></span>
        </td>
    </tr>
    <tr class="even">
        <td width="150px" align="right"><%=LanguageUtility.GetLanguageText("DEFAULT_SELECT", Session) %>:</td>
        <td><asp:CheckBox ID="chkDefaultSelect" runat="server" Text="Yes" /></td>
    </tr>
    <tr class="odd">
        <td width="150px" align="right"><%=LanguageUtility.GetLanguageText("ACTIVE", Session) %>:</td>
        <td><asp:CheckBox ID="chkActive" runat="server" Text="Active" Checked="true" /></td>
    </tr>
</table>
<p style="text-align: left; margin-top: 10px;">
    <span id="spSave2" class="yui-button yui-link-button yuibtn yuibtn-icon btnsave"><span class="first-child"><input id="btnSave2" type="submit" value="Save" runat="server" onserverclick="btnSave_Click" /></span></span>
    <span id="spCancel2" class="yui-button yui-link-button yuibtn yuibtn-icon btncancel"><span class="first-child"><a href="?type=<%=Request.QueryString["type"] %>&name=<%=Request.QueryString["name"] %>&action=viewcat&id=<%=Request.QueryString["catid"] %>"><%=LanguageUtility.GetLanguageText("CANCEL", Session)%></a></span></span>
</p>
<script type="text/javascript">
    YAHOO.util.Event.onContentReady('spSave2', function () {
        var spSave2 = new YAHOO.widget.Button("spSave2");
    });
    YAHOO.util.Event.onContentReady('spCancel2', function () {
        var spCancel2 = new YAHOO.widget.Button("spCancel2");
    });
</script>
</form>